#ifndef ACAPELLA_TRAITS_BASE_H
#define ACAPELLA_TRAITS_BASE_H

namespace acapella
{
namespace traits
{
	/* this is just a stub type .. */
	struct stub{};

	/* element type*/
	template<typename A> struct element_type {typedef A type;};
	template<typename A> struct element_type<const A> {typedef A type;};
	template<typename A> struct element_type<volatile A> {typedef A type;};
	template<typename A> struct element_type<const volatile A> {typedef A type;};

	/* base type */
	template<typename A> struct base_type { typedef A type; };
	template<typename A> struct base_type<A *> { typedef A type; };
	template<typename A> struct base_type<A &> { typedef A type; };
	template<typename A> struct base_type<A const *> { typedef A type; };
	template<typename A> struct base_type<A const &> { typedef A type; };


	/* reference type */
	template<typename A> 
	struct reference_type {typedef A& type;};

	template<> struct reference_type<void>{typedef void type;};
	template<> struct reference_type<void const>{typedef void type;};
	template<> struct reference_type<void const volatile>{typedef void type;};
	template<> struct reference_type<void volatile>{typedef void type;};

	/*
		type traits
	*/
	template<typename T> struct type_traits
	{
		typedef typename base_type<T>::type element_type;
		typedef typename base_type<T>::type value_type;
		typedef typename base_type<T>::type * pointer_type;
		typedef typename reference_type<
				typename base_type<T>::type
			>::type reference_type;
	};


	/* pointer traits */
	template<typename pointerType>
	struct poiner_traits{};

	template<typename T>
	struct poiner_traits<T*>
	{
		typedef typename element_type<T>::type element_type;
	};

	/* bool struct */
	struct true_type{};
	struct false_type{};




    

}
}

#endif
